package cn.bellychang.eventhook;

import cn.bellychang.websocket.ClientRunnable;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * @author ChangLiang
 * @date 2020/3/12
 */
@Component
public class DispatcherServletInitializedListener implements ApplicationListener<ContextRefreshedEvent> {
    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        new Thread(new ClientRunnable(),"aaaaa").start();
    }
}
